<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Cadastro de Usuario</title>
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/style.css"/>
    <script type="text/javascript" src="<?php echo base_url() ?>js/jquery-1.6.js"></script>
    <script type="text/javascript" src="<?php echo base_url() ?>js/jquery.validate.js" ></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>js/validate_form.js"></script>
  </head>
  <body>
    <?php
    include ("includes/nav_bar.php");
    ?>
    <div id="main-content">
      <div id="conteudo">
        <form action="<?php echo base_url() ?>usuario/salvarCadastro" method="post" class="form_cadastro" id="form_cadastro">
          <h1>Cadastrar usuario</h1>
          <?php if (isset($view_msg))
            echo $view_msg; ?>
          <p><label class="medio" for="nome" >Nome:</label><input type="text" name="nome" value="<?php if (isset($view_nome))
            echo $view_nome; ?>" class="grande" id="nome"/></p>
          <p><label class="medio" for="email" >Email:</label><input type="text" name="email" value="<?php if (isset($view_email))
                                                                    echo $view_email; ?>" class="grande" id="email"/></p>
          <p><label class="medio" for="usuario">Usuario:</label><input type="text" name="usuario" value="<?php if (isset($view_username))
                                                                      echo $view_username; ?>" class="pequeno" id="usuario"/>
            <label class="pequeno" for="senha">Senha:</label><input type="password" name="senha" value="" class="pequeno" id="senha"/></p>
          <?php if (isset($_SESSION['acesso']) && $_SESSION['acesso'] == 'adm'): ?>
            <p><label class="medio" for="acesso">Tipo de acesso:</label><select name="acesso" id="acesso">
                <option value="user" selected>Usuario</option>
                <option value="adm">Administrador</option>
              </select></p>
          <?php endif; ?>
          <p><label class="medio" for="descricao" style="vertical-align: top;">Descrição:</label><textarea name="descricao" cols="54" rows="10" id="descricao"><?php if (isset($view_descricao))
            echo $view_descricao; ?></textarea></p>
          <p><input type="submit" name="enviar" value="Enviar" class="btn"/></p>
        </form>
      </div>
    </div>
  </body>
</html>